<template>
    <div class="nav">
        <van-nav-bar title="设置" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-cell title="修改资料" @click="push" is-link style="margin-top: 10px;" />
        <van-button color="red" plain block style="margin-top: 70vh;width: 98vw;margin-left: 1vw;"
            @click="Logout">退出登录</van-button>
    </div>
</template>

<script setup>
import { useRouter, useRoute } from 'vue-router'
const onClickLeft = () => history.back();

const router = useRouter()
const route = useRoute()

const push = () => {
    router.push('/my/set/setAccount')
}

const Logout = () => {
    localStorage.clear()
    router.push('/l/login')
}


</script>

<style lang="scss" scoped>
.nav {
    height: 100vh;
    background-color: #f0f0f0;
    color: black;
}
</style>